<%@page import="models.Country"%>
<%@page import="helpers.CountryHelper"%>
<%@page import="helpers.ItuneXMLUrlHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	response.setCharacterEncoding("UTF-8");
	HttpSession sess = request.getSession(true);
	ItuneXMLUrlHelper urlHelper = new ItuneXMLUrlHelper();
	if (session.getAttribute("country") != null) {
		urlHelper.setCountry((String) session.getAttribute("country"));
	}
	Country country = CountryHelper.getCountryByCode(urlHelper.getCountry());
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="<%=request.getParameter("description").replaceAll("[\"\']+", "")%>" >
<meta name="Keywords" content="<%=request.getParameter("keywords").replaceAll("[\"\']+", "")%>" >
<link href="/css/style.css" type="text/css" rel="stylesheet">
<link rel="alternate" type="application/rss+xml" title="1stapp.org - RSS" href="http://www.1stapp.org/rss" />
<meta property="ogite_name" content="<%=request.getAttribute("ogite_name") %>" >
<meta property="og:title" content="<%=request.getParameter("ogtitle").replaceAll("[\"\']+", "")%>" >
<meta property="og:url" content="<%=request.getParameter("ogurl")%>" >
<meta property="og:image" content="<%=request.getParameter("ogimage")%>" >
<meta property="ogescription" content="<%=request.getParameter("ogescription") %>" >
<script type="text/javascript" src="/js/jquery-1.7.	1.min.js"></script>
<title><%=request.getParameter("title")%></title>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-11873634-3']);
  _gaq.push(['_setDomainName', '1stapp.org']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
	<!-- 1 - top bar -->
    <div id="top-bar">
    	<div class="left-bar">
    		<div class="small-logo"><a href="/home"><img src="/images/logo.png" width="98" height="34"></a></div>
    		<div id="search-box">
    			<form id="searchForm" method="get" action="/s">
                <input type="text" class="search-input" name="v" value="">
                <div class="submit-search" onclick="document.getElementById('searchForm').submit();">
                         <div class="right"></div>
                         <div class="center" title="find apps">Search »</div>
                         <div class="left"></div>
                </div> 
            </form>
    		</div>
    	</div>
    	<div class="right-bar">
    		<ul class="main-menu">
    			<li class="first item"><a href="/home">Home</a></li>
    			<li class="item"><a href="/contact">Contact Us</a></li>
    			<li class="item"><a href="/top-in-country">Top in country</a></li>
    			<li>
    				<div class="list-country">
    					<a href="/countries">
    						<img src="/images/flags/34x34/<%=country.getIosCode2Digit().toLowerCase() %>.png" width="15" height="15" />
    						<span><%=country.getName() %></span>
    					</a>
    				</div>
    				<div class="txt">Choose Country: </div>
    			</li>
    		</ul>
    	</div>
    	<div class="clear"></div>
    </div>
    <!-- 1- end top bar -->
    
    <!-- 1 - container -->
    <div id="container">